package com.hd.util;

import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
import cn.hutool.crypto.symmetric.SymmetricCrypto;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

/**
 * @author hzhh123
 * @time 2018年2月7日下午2:46:09
 **/
public class Const {
	public static LoadProperties loadProperties = new LoadProperties("config.properties");
	// 附件上传地址
	public static final String BASE_UPLOAD_PATH = loadProperties.getValue("BASE_UPLOAD_PATH");
	// 附件访问地址
	public static final String ATTACH_URL = loadProperties.getValue("ATTACH_URL");
	public static final String LOCALHOST = loadProperties.getValue("localhost");
	public static final int PORT = Integer.valueOf(loadProperties.getValue("port"));

	public static final String DOMAIN = loadProperties.getValue("domain");
	/**
	 * 机器学习图片地址前缀
	 */
	public static final String JQXX_IMG_PRESIX=loadProperties.getValue("jqxx_img_prefix");
	/**
	 * 未识别的图片路径
	 */
	public static final String UN_CORRECT=loadProperties.getValue("un_correct");
	/**
	 * 已识别的图片路径
	 */
	public static final String RECOGNIZED=loadProperties.getValue("recognized");
	/**
	 * 文件样本数据目录
	 */
	public static final String INPUT=loadProperties.getValue("input");
	// 返回序列号
	public static String getSerialNumber() {
		SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
		return df.format(new Date()) + new Random().nextInt(1000);
	}

}
